@isTest
private class testBatchtocheckOppstatusEDC {
   
    static testMethod void testBatchtocheck() {
    
        BatchtocheckOppstatusEDC bco = new BatchtocheckOppstatusEDC();
        bco.querystring='select id,CloseDate,Upper_EDC__c from Opportunity LIMIT 200 ';
        Test.startTest();
        
        Account a=new Account();
        a.FirstName='Test';
        a.LastName='One';
        a.Personal_Email__pc='test1@cg.com';
        insert a;
        
        Project_Name__c project=new Project_Name__c();
        project.Name='Test';
        project.Project_Type__c='Casa';
        insert project;
        
        List<Opportunity> opplist=new List<Opportunity>();
        Opportunity opp=new Opportunity();
        opp.Name='Test';
        opp.AccountId=a.Id;
        opp.closedate=date.newinstance(2012, 7, 2);
        opp.Project_Name__c=project.Id;
        opp.StageName='Qualified';
        opp.Upper_EDC__c =  date.newinstance(2012, 9, 5);
                   
        opplist.add(opp);
        insert opplist;
        
        
        Database.executeBatch(bco,200);
        
        Test.stopTest();
        
       
    }
}